# Problem 4
# =========
# A palindromic number reads the same both ways.
# The largest palindrome made from the product 
# of two 2-digit numbers is 9009 = 91 x 99.
#
# Find the largest palindrome made from the product
# of two 3-digit numbers.

MAX_PRODUCT = 999*999

def ispalindrome(n):
    return str(n)==str(n)[::-1]

pals = []
for i in range(999,800,-1):
    for j in range(i,800,-1):
        if ispalindrome(i*j):
            pals.append(((i*j), i, j))

print "-> ", max(pals) 
